package org.theSeed.base.pojo.dto;

import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;

/**
 * 通用接受单值对象
 * @param <K>
 * @param <V>
 */
@Getter
@Setter
public class CommonKeyValue<K,V> {
    /**
     * 通用键
     */
    @NotNull(message = "key不能为空")
    private K key;

    /**
     * 通用值
     */
    @NotNull(message = "value不能为空")
    private V value;

    public CommonKeyValue() {
    }

    public CommonKeyValue(K key, V value) {
        this.key = key;
        this.value = value;
    }
}
